<div class="card">
    <h2 class="contentTitle">
        <a class="button" href="cmsTemplate/upload.html?path=${(path?url)!}" target="dialog" mask="true" width="500" height="250"><@t.page 'template.upload'/></a>
        <a class="button" href="cmsTemplate/export?_csrf=<@tools.csrfToken admin=true/>" target="dwzExport" targetType="navTab"><@t.page 'button.export'/></a>
        <#if path?has_content>
            <a class="button" href="cmsTemplate/delete?path=${path?url}&navTabId=cmsTemplate/list&_csrf=<@tools.csrfToken admin=true/>" title="<@t.page 'confirm.delete_directory'/>" target="ajaxTodo"><@t.page 'button.delete_directory'/></a>
            <a class="button" href="cmsTemplate/metadata.html?path=${(path?url_path)!}/" target="ajax" rel="cmsTemplateBox"><@t.page 'template.create_here'/></a>
        </#if>
        <a class="button" href="cmsFileBackup/list.html?path=${(path?url)!}" target="navTab" rel="cmsFileBackup/list" icon="<i class='bi bi-recycle icon-large'></i>"><@t.page 'recycle_bin'/></a>
    </h2>
    <div class="pageFormContent" layoutH>
        <fieldset>
            <legend><@t.page 'template_search_replace'/></legend>
            <form action="cmsTemplate/search.html" autocomplete="off" onsubmit="return divSearch(this,'cmsTemplateBox');" method="post">
                <input type="hidden" name="path" value="${path!}"/>
                <label><@t.page 'template.content'/>:</label>
                <input type="text" name="word" size="60"/>
                <button type="submit" class="buttonActive"><@t.page 'button.search'/></button>
            </form>
        </fieldset>
        <fieldset>
            <legend><@t.page 'template.directory'/></legend>
            <form action="cmsTemplate/createDirectory?navTabId=${navTabId!'cmsTemplate/list'}" method="post" autocomplete="off" class="required-validate" onsubmit="return validateCallback(this, navTabAjaxDone)">
                <input type="hidden" name="_csrf" value="<@tools.csrfToken admin=true/>"/>
                <label><@t.page 'name'/>:</label>
                <input type="hidden" name="path" value="${path!}"/>
                <input type="text" name="name" class="required" size="30"/>
                <button type="submit" class="buttonActive" title="ctrl+s"><@t.page 'button.create_directory'/></button>
            </form>
        </fieldset>
<#if !path?has_content>
        <fieldset>
            <legend><@t.page 'server_config.site'/></legend>
            <div><a href="sysConfigData/edit.html?code=site" class="edit btnText blue" target="navTab" rel="sysConfigData/edit"><i class="icon-edit"></i><@t.page 'config_data.edit'/></a></div>
        <@sys.configData code="site">
            <dl class="nowrap">
                <dt><@t.message 'config.site.site_exclude_module'/>:</dt>
                <dd><#if (object.site_exclude_module)?has_content><#list object.site_exclude_module?split(',') as a><@t.menu a/><#sep>,</#list></#if></dd>
            </dl>
            <dl>
                <dt><@t.message 'config.site.login_path'/>:</dt>
                <dd>${(object.login_path)!}</dd>
            </dl>
            <dl>
                <dt><@t.message 'config.site.register_url'/>:</dt>
                <dd>${(object.register_url)!}</dd>
            </dl>
            <dl class="nowrap">
                <dt><@t.message 'config.site.category_template_path'/>:</dt>
                <dd>${(object.category_template_path)!}</dd>
            </dl>
            <dl class="nowrap">
                <dt><@t.message 'config.site.category_path'/>:</dt>
                <dd>${(object.category_path)!}</dd>
            </dl>
        </@sys.configData>
        </fieldset>
        <div class="divider"></div>
        <div class="unit">
            <a class="button" href="cmsTemplate/import.html" target="dialog" mask="true" width="500" height="250"><@t.page 'import.site'/></a>
            <form action="cmsTemplate/doImport?callbackType=closeCurrent&navTabId=cmsTemplate/list" method="post" autocomplete="off" enctype="multipart/form-data" class="pageForm required-validate" onsubmit="return iframeCallback(this, dialogAjaxDone)">
                <input type="hidden" name="_csrf" value="<@tools.csrfToken admin=true/>"/>
                <dl class="nowrap">
                    <dt><@t.menu 'sitefile'/>:</dt>
                    <dd>
                        <input type="text" name="fileName" class="required" readonly="readonly" size="30"/>
                        <a class="btnLook" href="cmsTemplate/lookupSitefile.html" lookupGroup="" width="1000" height="600"><@t.menu 'sitefile'/></a>
                        <label><input type="checkbox" name="overwrite" checked="checked"><@t.page 'import.overwrite'/></label>
                    </dd>
                </dl>
                <div><button type="submit" class="buttonActive"><@t.page 'import'/></button></div>
            </form>
        </div>
</#if>
    </div>
</div>